package com.scu.hotelsystem.util;

public class Result {
    public static final int SUCCESS_CODE = 0;
    public static final String SUCCESS_MSG = "成功";
    public static final int DEFAULT_COUNT = 0;

    private int code;
    private String msg;
    private int count;
    private Object data;

    public Result(){
        this.code = SUCCESS_CODE;
        this.msg = SUCCESS_MSG;
        this.count = DEFAULT_COUNT;
    }

    public Result(int count, Object data){
        this.code = SUCCESS_CODE;
        this.msg = SUCCESS_MSG;
        this.count = count;
        this.data = data;
    }

    public Result(int code, String msg){
        this.code = code;
        this.msg = msg;
        this.count = DEFAULT_COUNT;
    }

    public Result(int code, String msg, int count, Object data){
        this.code = code;
        this.msg = msg;
        this.count = count;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
